<?php defined('IN_IA') or exit('Access Denied');?><!doctype html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />		
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<meta charset="utf-8">
<link rel="stylesheet" href="<?php echo MODULE_URL;?>resource/css/style.css" />
<?php  if($color!="") { ?>
<link rel="stylesheet" href="<?php echo MODULE_URL;?>resource/css/<?php  echo $color;?>.css" />
<?php  } ?>
<script type="text/javascript" src="<?php echo MODULE_URL;?>resource/js/jquery-2.1.4.min.js" ></script>
<title>我的成绩</title>
<?php  echo register_jssdk();?>
</head>
<body>
<div class="resultBox">
  
  <!-- <div class="avatar">
  	<img src="<?php  echo $headimg;?>">
  </div> -->
  <div class="info">
  	<!-- <p class="tc"><?php  echo $nick;?></p> -->
  	<!-- 
  	<p><i class="iconfont">&#xe604;</i> 分数：<span><?php  echo $points;?></span></p>
  	<p><i class="iconfont">&#xe603;</i> 用时：<span><?php  echo $sytime;?></span>秒</p>
  	 -->
  	
  	
 <?php  if($userinfo['points']!=$reply['zongfen']) { ?> 
 <img class="img-result" src="<?php echo MODULE_URL;?>resource/images/error.png"" alt="">
 <p><a href="<?php  echo $this->createMobileUrl('index',array('rid'=>$rid));?>">很遗憾答题失败,点击返回首页 </a></p>
 
 <?php  } ?>
 
  	<?php  if($userinfo['points']==$reply['zongfen'] && $usershare ) { ?>  <img class="img-result" src="<?php echo MODULE_URL;?>resource/images/success.png"" alt="">
  	<p><a href="<?php  echo $this->createMobileUrl('index',array('rid'=>$rid));?>">恭喜您成功领取宝藏,点击返回首页</a></p>
  	<?php  } ?>
  	
  	<?php  if(!$usershare ) { ?>  <img class="img-result" src="<?php echo MODULE_URL;?>resource/images/success.png"" alt="">
  	<p><a href="<?php  echo $this->createMobileUrl('goshare',array('rid'=>$rid));?>">您还没有分享答案揭秘无法领取宝藏,点击这里去分享</a></p>
  	<?php  } ?>
  	
  </div>
  
  <!-- 
  
   <div class="btn">
  	<ul class="flex">
  		<li><a href="#" class="again" onclick="startto()"><i class="iconfont">&#xe608;</i> 重新回答<i class="count"><?php  echo $shyucount;?></i></a>
  		<?php  if($isshareadd==1) { ?><?php  if($is_max==0) { ?><p>每邀请一个好友答题，可以增加一次答题机会</p><?php  } else { ?><p>您的分享次数已用完，谢谢您参与答题</p><?php  } ?><?php  } ?></li>
  	</ul>
  	<ul class="flex">
  		<li><a href="<?php  echo $this->createMobileUrl('ranking',array('rid'=>$rid));?>"><i class="iconfont">&#xe602;</i> 排行榜</a></li>
  		<li><a href="javaScript:;" class="share"><i class="iconfont">&#xe605;</i> 呼唤朋友</a></li>
  	</ul>
  </div>
   -->
 
</div>

<!--问答提示 start-->
<div class="result" id="nocount" style="display:none;">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<div class="txt"><p><i class="iconfont">&#xe607;</i></p><p>您没有答题的机会了</p><?php  if($isshareadd==1) { ?><?php  if($is_max==0) { ?><p>每邀请一个好友答题，可以增加一次答题机会</p><?php  } else { ?><p>您的分享次数已用完，谢谢您参与答题</p><?php  } ?><?php  } ?></div>
		<div class="btn">
			<ul class="flex">
				<li><a href="<?php  echo $this->createMobileUrl('ranking',array('rid'=>$rid));?>"><i class="iconfont">&#xe602;</i> 排行榜</a></li>
				<li><a href="javaScript:;" class="red share"><i class="iconfont">&#xe605;</i>呼唤朋友</a></li>
			</ul>
		</div>
	</div>
</div>
<!--问答提示 end-->
<div class="result" id="jldiv" style="display:none;">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<div class="txt" style="color:red;"><p><i class="iconfont">&#xe607;</i></p><p><?php  echo $jlcontent;?></p></div>
		<div class="btn">
			<ul class="flex">
				<li><a href="#" onclick="lingjiang()">立即领奖</a></li>
			</ul>
		</div>
	</div>
</div>
<!--核销-->
<div class="imInfo" style="display: none;" id="hxdiv">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<h2>请输入领奖码</h2>
		<div class="txt" id="errortxt">此领奖码由商家输入！</div>
		<ul>
			<li><input type="text" placeholder="请输入领奖码" id="hxnum"></li>
		</ul>
		<div class="btn"><a href="#" onclick="hexiao()">核销</a></div>
	</div>
</div>
<!--核销提示 end-->
<div class="result" id="hxres" style="display:none;">
	<div class="box">
		<div class="close fr"><i class="iconfont">&#xe606;</i></div>
		<div class="txt" style="color:red;"><p><i class="iconfont">&#xe607;</i></p><p>核销成功</p></div>
	</div>
</div>
<!--share-->
<div class="tips"><img src="<?php echo MODULE_URL;?>resource/images/guide.gif" width="100%"></div>
<script>
$(document).ready(function(){
	$(".share,.tips").click(function(){
		$(".tips").toggle(0);
	})
	
	$(".close").click(function(){
		$(this).closest(".result").hide(0);
	})
	$(".close").click(function(){
		$(this).closest("#hxdiv").hide(0);
	})
	//debugger;
	<!-- var ljstatus=<?php  echo $ljstatus;?>; -->
	<!-- var points=<?php  echo $points;?>; -->
	<!-- var isjl=<?php  echo $isjl;?>; -->
	<!-- var jltype=<?php  echo $jltype;?>; -->
	<!-- var jlnum=<?php  echo $jlnum;?>; -->
	<!-- if(isjl==1){ -->
		<!-- if(ljstatus==0 || ljstatus==""){ -->
			<!-- if(jltype==0){ -->
				<!-- //$("#jldiv").show(); -->
			<!-- }else{ -->
				<!-- if(points>=jlnum){ -->
					<!-- $("#jldiv").show(); -->
				<!-- } -->
			<!-- } -->
		<!-- } -->
	<!-- } -->
})
function startto(){
	if(parseInt(<?php  echo $shyucount;?>)==0){
		$("#nocount").show();
	}else{
		var url="<?php  echo $this->createMobileUrl('dati')?>";
		var rid='<?php  echo $rid;?>';
		var fromid='<?php  echo $fromid;?>';
		location.href=url+"&rid="+rid+"&fromid="+fromid;
	}
}

function lingjiang(){
	$("#jldiv").hide();
	$("#hxdiv").show();
}

function hexiao(){
	var hxnum=$("#hxnum").val();
	var url="<?php  echo $this->createMobileUrl('hexiao',array('id'=>$id,'rid'=>$rid))?>&hxnum="+hxnum;
	$.post(url, {},function(data){
			if(data.success==1){
				$("#hxdiv").hide();
				$("#hxres").show();
			}else{
				$("#errortxt").html(data.msg);
			}
   	},"json");
}

wx.ready(function(){
   sharedata = {
       title: "<?php  echo $sharetitle;?> ",
       desc: "<?php  echo $sharecontent;?>",
       link: "<?php  echo $sharelink;?>",
       imgUrl: "<?php  echo $shareimg;?>"
	}; 
	wx.onMenuShareAppMessage(sharedata);//分享给朋友
	wx.onMenuShareTimeline(sharedata);//分享到朋友圈
	wx.showOptionMenu();//显示右上角按钮
});
</script>
<script>;</script><script type="text/javascript" src="http://www.wdt.com/app/index.php?i=1&c=utility&a=visit&do=showjs&m=dg_dati"></script></body>
</html>
